package com.itheima.wallet.service;



import com.itheima.wallet.api.AccountServiceApi;
import com.itheima.wallet.dao.AccountMapper;
import com.itheima.wallet.model.Account;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;

@Service(version = "1.0.0",interfaceClass = AccountServiceApi.class,retries = 2,timeout = 10000)
public class AccountService implements AccountServiceApi {


    @Autowired
    AccountMapper accountMapper;


 /*   @Override
    public boolean addAccount(Account account) {
        account.setCreateTime(new Date());
        account.setUpdateTime(new Date());
        //accountMapper.insertAccount(account);
        return true;
    }*/

    @Override
    public String getAccountInfo(Long id) {
        Account account = accountMapper.selectAcountByAccountId(id);

        return account.getAccountName();
    }
}
